package com.example.userpointmgr.tool;

import lombok.Getter;
import lombok.Setter;

public class PageParam {
    @Getter
    @Setter
    private int pageNum;
    @Getter
    @Setter
    private int pageSize;

    public PageParam(int pageNum, int pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
    //计算偏移量
    public int getOffset(){
        return (pageNum - 1) * pageSize;
    }
}
